package pe.edu.upc.xcode.food.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import pe.edu.upc.xcode.food.domain.Plato;
import pe.edu.upc.xcode.food.rest.PlatoWS;


/**
 * 
 * @author MADELEY
 * @since 23.01.12
 *
 */
public class platoController {
	
	@Autowired
	PlatoWS platoWS;

	@RequestMapping("/pago/ingresar.htm")
	public ModelAndView ingresarPago(HttpServletRequest request,
		HttpServletResponse response) throws Exception {
		String message = "Pago Consulta";
		return new ModelAndView("pago/PagoConsulta", "message", message);
	}
	
	@RequestMapping("/pago/pagoConsulta.htm")
	public ModelAndView save(HttpServletRequest request,
		HttpServletResponse response) throws Exception {
		
		
		String message =  "Plato Cliente";

		String codigoCategoria = request.getParameter("txtNombre_Int1");
		String strNombreRestaurant = request.getParameter("txtNombre_Int1");
		String strDescripcionRestaurant = request.getParameter("txtNombre_Int1");
		
		Plato plato = new Plato();
		
		plato.setCodigoCategoria(Integer.parseInt(codigoCategoria));
		plato.setStrNombreRestaurant(strNombreRestaurant);
		plato.setStrDescripcionRestaurant(strDescripcionRestaurant);
		
		String rpta = null;
		
		System.out.println("Result :"+ rpta);
		
		//response.sendRedirect("http://localhost:8080/EvaluacionCrediticiaWeb/");
		return null;
	}
	
}
